ATOM SaaS - Quick Start Guide
š Quick Start
This guide will get your ATOM SaaS platform running in minutes.
1. Environment Setup
# Copy environment template
cp .env.example .env.local
# Edit .env.local with your configuration
# Required variables:
# - DATABASE_URL (Neon PostgreSQL)
# - JWT_SECRET (generate a random string)
# - AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_S3_BUCKET
# - STRIPE_SECRET_KEY, STRIPE_PUBLISHABLE_KEY
# - SMTP_HOST, SMTP_USER, SMTP_PASS (for emails)2. Install Dependencies
npm install3. Database Setup
# Run database migrations and seed data
npm run setup:dev4. Start Development Server
npm run devYour platform will be available at:
- **Marketing Site**: http://localhost:3000
- **Admin Dashboard**: http://localhost:3000/admin
- **Demo Tenant**: http://localhost:3000 (automatic redirect)
5. Default Login Credentials
**Admin Account:**
- Email: admin@atom-saas.com
- Password: admin123 (change this in production!)
**Demo Tenant:**
- Subdomain: demo
- Email: admin@demo.com
- Password: demo123
š§ Configuration
Database
- **Recommended**: Neon Serverless PostgreSQL
- **Local**: PostgreSQL 14+
- **Connection**: Use connection string in
DATABASE_URL
Storage
- **Required**: AWS S3 bucket
- **Settings**: Configure in
.env.local - **Structure**: Automatic per-tenant prefix organization
- **Recommended**: Resend, SendGrid, or Postmark
- **SMTP**: Configure with your provider
- **Templates**: Automatic email workflows included
Payment
- **Required**: Stripe account
- **Test**: Use test keys during development
- **Webhooks**: Configure webhook endpoint
š Project Structure
atom-saas/
āāā src/
ā āāā app/ # Next.js App Router
ā ā āāā admin/ # Admin dashboard routes
ā ā āāā api/ # API routes
ā ā āāā auth/ # Authentication pages
ā āāā components/ # React components
ā ā āāā admin/ # Admin UI components
ā ā āāā ui/ # Reusable UI components
ā ā āāā layout/ # Layout components
ā āāā lib/ # Core libraries
ā ā āāā auth.ts # NextAuth configuration
ā ā āāā database.ts # Database service
ā ā āāā email.ts # Email service
ā ā āāā storage.ts # S3 storage service
ā ā āāā admin-auth.ts # Admin authentication
ā āāā middleware.ts # Request middleware
āāā database/ # SQL schemas
āāā scripts/ # Utility scripts
āāā docs/ # DocumentationšÆ Next Steps
- **Configure External Services**: Set up your Neon, AWS, Stripe, and email accounts
- **Customize Branding**: Update colors, logos, and content
- **Test Flows**: Verify tenant creation, user management, and billing
- **Deploy**: Use ATOM Cloud or your preferred hosting platform
- **Monitor**: Set up analytics and alerting
š ļø Development Commands
# Development
npm run dev # Start dev server
npm run build # Build for production
npm run start # Start production server
# Database
npm run db:migrate # Run migrations
npm run db:seed # Seed initial data
npm run db:reset # Reset database (destructive!)
# Quality
npm run lint # Run ESLint
npm run type-check # TypeScript type checking
npm run test # Run tests
npm run test:coverage # Test coverage reportš Security Notes
- **Change Default Passwords**: Update admin credentials in production
- **Environment Variables**: Never commit
.env.localfiles - **HTTPS Required**: Use HTTPS in production (especially for OAuth)
- **Database Security**: Enable connection encryption
- **API Keys**: Rotate API keys regularly
š Monitoring
The platform includes comprehensive monitoring:
- **Health Checks**:
/api/health - **Admin Analytics**: Full dashboard with metrics
- **Error Tracking**: Detailed error logging and reporting
- **Usage Analytics**: Tenant and system-wide usage tracking
ATOM Cloud (Recommended)
# Install ATOM CLI
curl -fsSL https://get.atomagentos.com/install.sh | bash
# Deploy
atom-cli deployOther Platforms
The platform is container-ready and can be deployed on:
- AWS (ECS, Lambda)
- Google Cloud (Run, Cloud Run)
- Azure (Container Instances)
- DigitalOcean (App Platform)
- Heroku (Container Registry)
š Getting Help
- **Documentation**: Check
/docsfolder for detailed guides - **Health Check**: Run
npm run healthto verify services - **Logs**: Check browser console and server logs
- **Issues**: Review database migrations and environment setup
ā Verification Checklist
After setup, verify:
- [ ] Marketing site loads at
localhost:3000 - [ ] Admin dashboard accessible at
localhost:3000/admin - [ ] Demo tenant routing works
- [ ] Database migrations completed successfully
- [ ] Email service configured
- [ ] Storage service accessible
- [ ] All environment variables set
---
š **Congratulations!** Your ATOM SaaS platform is ready for development and testing.
Need help? Check the detailed documentation in the /docs folder or run npm run health to verify your setup.